<?php
use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this \yii\web\View */
/* @var $model \app\models\Activity */

?>

<?php foreach ($models as $model): ?>
    <div class="card-box">
        <div class="card-box-inner">
            <?php if($model->getIsNew()): ?>
            <div class="tag-new">最新</div>
            <?php elseif($model->getIsHot()): ?>
                <div class="tag-hot">最热</div>
            <?php endif; ?>

            <div class="card-img">
                <a data-href="<?= Url::to(['activity/detail', 'id' => $model->id]); ?>">
                    <img class="activity" src="<?= $model->getThumb(); ?>"/>
                </a>
            </div>
            <div class="card-content">
                <div class="card-content-title">
                    <h4><?= Html::encode($model->title); ?></h4>
                </div>

                <?= $this->render($model->getIsActivity() ? '/activity/__activity' : '/activity/__job', compact('model')); ?>
            </div>
        </div>
    </div>

<?php endforeach; ?>

